<template>
  <v-dialog-layout v-model:visible="visible" width="800px" @cancel="cancel">
    <v-config-detail
      label-width="70px"
      model="dialog"
      :detail-config="detailConfig"
      :detail-data="detailData"
    ></v-config-detail>
    <template #footer>
      <a-button @click="cancel">取消</a-button>
    </template>
  </v-dialog-layout>
</template>

<script setup lang="ts">
import { ref } from 'vue'
import { detailConfig } from './config'

const props = withDefaults(defineProps<{ visible: boolean }>(), {
  visible: false
})
const emit = defineEmits(['update:visible'])

const detailData = ref({})
detailData.value = {
  test: '90909',
  imgList: ['http://doc.zwjrobot.com/doc/assets/img/page-1.8b880e10.png',
    'http://doc.zwjrobot.com/doc/assets/img/page-1.8b880e10.png',
    'http://doc.zwjrobot.com/doc/assets/img/page-1.8b880e10.png'],
  img: 'http://doc.zwjrobot.com/doc/assets/img/page-1.8b880e10.png'
}
const cancel = () => {
  emit('update:visible', false)
}
</script>

<style scoped></style>